Local storage that is used by an HTML (HyperText Markup Language) 5 application that is executed by a browser engine is provided for each origin of that HTML 5 application. An origin is a combination of a scheme, host, and port that are included in a URL (Uniform Resource Locator). For example, in an aspect in which delivery servers are accessed from a browser engine and plural HTML5 applications are executed, when the delivery servers of providers are all different, local storage that is used by each HTML5 application is separately provided.
In an example illustrated in FIG. 1, a browser engine 111 accesses a delivery server 103a by way of the Internet and loads an HTML5 application 113a. When doing this, an HTTP (Hypertext Transfer Protocol) request in which a URL “http://aplstore1.com/index.html” has been set is sent to the delivery server 103a from the browser engine 111. Moreover, the browser engine 111 accesses a delivery server 103b by way of the Internet and loads an HTML5 application 113b. When doing this, an HTTP request in which a URL “http://aplstore2.com/index.html” has been set is sent to the delivery server 103b from the browser engine 111.
The origin of the HTML5 application 113a is “http://aplstore1.com/”, and the origin of the HTML5 application 113b is “http://aplstore2.com/”, and the origins do not match. Therefore, local storage 115a that is used by the HTML5 application 113a, and local storage 115b that is used by the HTML5 application 113b are separately provided.
The HTML5 application 113a, the HTML5 application 113b, the local storage 115a and the local storage 115b are included in a management range 117 of the browser engine 111.
As another aspect, when an HTML5 application 113 that has once been internally stored is operated by the browser engine 111, the origin of the HTML5 application 113 becomes the same, for example “file:///”, regardless of the Web site of the provider. As a result, even in the case of an HTML5 application 113 that is provided from a different delivery server 103, the same local storage 115 is used.
In an example illustrated in FIG. 2, an obtaining unit 201 obtains an application package 203a that includes an HTML5 application 113a from the delivery server 103a, and a user terminal 101 is set to a state of internally storing the HTML5 application 113a. Moreover, the obtaining unit 201 obtains an application package 203b that includes an HTML5 application 113b from the delivery server 103b, and the user terminal 101 is set to a state of internally storing the HTML5 application 113b. The application package 203 is a package that includes files and metadata that are used when executing the HTML5 application 113. The user terminal 101 is a smartphone, for example.
The browser engine 111 then internally loads the HTML5 application 113a from the application package 203a. The URL “file:///data/apps/app1/index.html” is set in the request at this time. Moreover, the browser engine 111 internally loads the HTML5 application 113b from the application package 203b. The URL “file:///data/apps/app2/index.html” is set in the request at this time.
The origin of the HTML5 application 113a is “file:///”, and the origin of the HTML5 application 113b is “file:///”, and they match. Therefore, the HTML5 application 113a and the HTML5 application 113b share a local storage 115c. The obtaining unit 201, the application package 203a, the application package 203b and the management range 117 are included in the execution environment 205 of the HTML5 application 113. The execution environment 205 is controlled as a unit.
In this way, when the local storage 115 is shared, there is a possibility that data will be referenced or changed by an HTML5 application 113 having a different provider. The HTML5 application 113 is an example of a Web application.
Patent Document 1: Japanese Laid-open Patent Publication No. 2001-051839
Patent Document 2: International Publication Pamphlet No. WO 2009/139437
Patent Document 3: Japanese Laid-open Patent Publication No. 2007-336335
Patent Document 4: Japanese Laid-open Patent Publication No. 2007-323115